package cn.service;

import java.util.List;

import cn.bean.Play;
import cn.bean.Ticket;
import cn.bean.User;

public interface TicketService
{
	//  可用TicketDaoImpl下的findTicketByPlay方法查询！	
	//	public List<Ticket> queryTicket(Play play);//查询一个场次的已购Ticket
	//购票，当User为空（未登录）或seat已被购时false
    public boolean buyTicket(Play play,User user,int seat); 
    //判断一个场次是否存在该座位，是则返回true
    public boolean judgeSeat(Play play,int seat); 
    //限制购买数量，判断用户该play购票数是否大于等于4，是则返回true
    public boolean judgeNum(Play play,User user);
    //查询场次座位状态，0为未订，1为已订，索引行与列都从0开始
    public int[][] seatStatus(Play play);
    
    public String printSeat(int seat);   //输出座位名字
    
}
